package com.pks.datacenter.entity.api;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import com.pks.util.coder.database.DBField;
import com.pks.util.coder.database.DBQuery;
import com.pks.util.coder.database.DBTable;
import com.pks.web.mybatis.entity.BasicEntity;

@Data
@EqualsAndHashCode(callSuper = true)
@DBTable(tags = "接口账号",index_unique = {"account"})
public class ApiUser extends BasicEntity {
	
	
	private static final long serialVersionUID = -7258296282729686934L;
	
	@ApiModelProperty(value = "所属标签")
	@DBQuery(value = {"=" })
	@DBField(name = "tagId" , comment = "所属标签" )
	private Long tagId ; 			
	
	@ApiModelProperty(value = "接口账号")
	@DBField(comment = "接口账号" , nullable = false , length = 100)
	@DBQuery(value = {"=" , "like"})
	private String account;
	
	@ApiModelProperty(value = "接口密码")
	@DBField(comment = "接口密码" , nullable = false , length = 100)
	@DBQuery
	private String password;
	
	@ApiModelProperty(value = "账号名称")
	@DBField(comment = "账号名称" , length = 100)
	@DBQuery(value = {"=" , "like"})
	private String name;
	
	@ApiModelProperty(value = "调用白名单")
	@DBField(comment = "接口调用白名单" ,length = 2000) 
	private String allowIps;
	
	@ApiModelProperty(value = "账号描述")
	@DBField(comment = "账号描述")
	private String remark;

	@ApiModelProperty(value = "是否开启")
	@DBField(comment = "是否开启 1-是 0-否" , nullable = false , defaultValue = "1" )
	@DBQuery
	private Integer state ; 
	
	

	private String show_tagName;
	
	
}
